#pragma once

#include "localsocket.hpp"
#include "localconnection.hpp"

namespace Local_Connection
{
    class LocalChannel : public LocalConnection
    {
    public:
        /**********构造析构************** */
        LocalChannel(const int sockfd, const Local_Inetaddr::Inetaddr &client_addr)
            : _client_addr(client_addr)
        {
            SetFd(sockfd);
        }
        ~LocalChannel() {}

        /**********virtual************** */
        void Recver() override
        {
            std::cout<<"*********************************************************"<<std::endl;
            Local_Log::LOG(Local_Log::LogLever::LDEBUG) << "LocalChannel Recver ";
        }
        void Sender() override
        {
            Local_Log::LOG(Local_Log::LogLever::LDEBUG) << "LocalChannel Sender ";
        }
        void Excepter() override
        {
            Local_Log::LOG(Local_Log::LogLever::LDEBUG) << "LocalChannel Excepter ";
        }

        /**********GetSet************** */

    private:
        // client info
        Local_Inetaddr::Inetaddr _client_addr;
    };
}